﻿// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StreamAppApi.Bll.DbConfiguration;

#nullable disable

namespace StreamAppApi.Migrations.Migrations
{
    [DbContext(typeof(StreamPlatformDbContext))]
    partial class StreamPlatformDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.14")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Comment", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.HasKey("UserId", "VideoId");

                    b.HasIndex("VideoId");

                    b.ToTable("Comments", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.CountriesGroup", b =>
                {
                    b.Property<string>("CountriesGroupId")
                        .HasColumnType("text");

                    b.Property<string>("Description")
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("CountriesGroupId");

                    b.HasIndex("Name")
                        .IsUnique();

                    b.ToTable("CountriesGroups", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Country", b =>
                {
                    b.Property<string>("CountryId")
                        .HasColumnType("text");

                    b.Property<string>("CountriesGroupId")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text");

                    b.Property<string>("Slug")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("CountryId");

                    b.HasIndex("CountriesGroupId");

                    b.HasIndex("Name")
                        .IsUnique();

                    b.HasIndex("Slug")
                        .IsUnique();

                    b.ToTable("Countries", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Crew", b =>
                {
                    b.Property<string>("PersonId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.Property<string>("RoleId")
                        .HasColumnType("text");

                    b.HasKey("PersonId", "VideoId", "RoleId");

                    b.HasIndex("RoleId");

                    b.HasIndex("VideoId");

                    b.ToTable("Crews", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Favorite", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.HasKey("UserId", "VideoId");

                    b.HasIndex("VideoId");

                    b.ToTable("Favorites", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Genre", b =>
                {
                    b.Property<string>("GenreId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("Description")
                        .HasColumnType("text")
                        .HasColumnName("description");

                    b.Property<string>("Icon")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("icon");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("Slug")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.HasKey("GenreId");

                    b.HasIndex("Slug")
                        .IsUnique();

                    b.ToTable("Genres", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Movie", b =>
                {
                    b.Property<string>("MovieId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<byte[]>("BigPoster")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("bigPoster");

                    b.Property<byte[]>("BigPosterIv")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("bigPosterIv");

                    b.Property<int>("CountOpened")
                        .HasColumnType("integer")
                        .HasColumnName("countOpened");

                    b.Property<bool>("NeedSubscribe")
                        .HasColumnType("boolean")
                        .HasColumnName("needSubscribe");

                    b.Property<byte[]>("Poster")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("poster");

                    b.Property<byte[]>("PosterIv")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("posterIv");

                    b.Property<decimal?>("Price")
                        .HasColumnType("numeric")
                        .HasColumnName("price");

                    b.Property<double>("Rating")
                        .HasColumnType("double precision")
                        .HasColumnName("rating");

                    b.Property<string>("Slug")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("title");

                    b.HasKey("MovieId");

                    b.HasIndex("Slug")
                        .IsUnique();

                    b.ToTable("Movies", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Order", b =>
                {
                    b.Property<string>("OrderId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("MovieId")
                        .HasColumnType("text")
                        .HasColumnName("movieId");

                    b.Property<DateTime>("OrderDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("orderDate");

                    b.Property<string>("SerialId")
                        .HasColumnType("text")
                        .HasColumnName("serialId");

                    b.Property<string>("SubscribeId")
                        .HasColumnType("text")
                        .HasColumnName("subscribeId");

                    b.Property<decimal>("Sum")
                        .HasColumnType("numeric")
                        .HasColumnName("sum");

                    b.Property<string>("UserId")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("userId");

                    b.HasKey("OrderId");

                    b.HasIndex("MovieId");

                    b.HasIndex("SerialId");

                    b.HasIndex("SubscribeId");

                    b.HasIndex("UserId");

                    b.ToTable("Orders", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Person", b =>
                {
                    b.Property<string>("PersonId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.Property<string>("Patronymic")
                        .HasColumnType("text")
                        .HasColumnName("patronymic");

                    b.Property<byte[]>("Photo")
                        .HasColumnType("bytea")
                        .HasColumnName("photo");

                    b.Property<byte[]>("PhotoIv")
                        .HasColumnType("bytea")
                        .HasColumnName("photoIv");

                    b.Property<string>("Slug")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.Property<string>("Surname")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("surname");

                    b.HasKey("PersonId");

                    b.HasIndex("Slug")
                        .IsUnique();

                    b.ToTable("Persons", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Rating", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.Property<double?>("Value")
                        .HasColumnType("double precision");

                    b.HasKey("UserId", "VideoId");

                    b.HasIndex("VideoId");

                    b.ToTable("Ratings", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Role", b =>
                {
                    b.Property<string>("RoleId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("Description")
                        .HasColumnType("text")
                        .HasColumnName("description");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.HasKey("RoleId");

                    b.ToTable("Roles");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Season", b =>
                {
                    b.Property<string>("SeasonId")
                        .HasColumnType("text");

                    b.Property<int>("NumberSeason")
                        .HasColumnType("integer")
                        .HasColumnName("numberSeason");

                    b.Property<string>("SerialId")
                        .IsRequired()
                        .HasColumnType("text");

                    b.HasKey("SeasonId");

                    b.HasIndex("SerialId");

                    b.ToTable("Seasons", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Serial", b =>
                {
                    b.Property<string>("SerialId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<byte[]>("BigPoster")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("bigPoster");

                    b.Property<byte[]>("BigPosterIv")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("bigPosterIv");

                    b.Property<int>("CountOpened")
                        .HasColumnType("integer")
                        .HasColumnName("countOpened");

                    b.Property<bool?>("NeedSubscribe")
                        .HasColumnType("boolean")
                        .HasColumnName("needSubscribe");

                    b.Property<byte[]>("Poster")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("poster");

                    b.Property<byte[]>("PosterIv")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("posterIv");

                    b.Property<decimal?>("Price")
                        .HasColumnType("numeric")
                        .HasColumnName("price");

                    b.Property<double>("Rating")
                        .HasColumnType("double precision")
                        .HasColumnName("rating");

                    b.Property<string>("Slug")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("slug");

                    b.Property<string>("Title")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("title");

                    b.HasKey("SerialId");

                    b.HasIndex("Slug")
                        .IsUnique();

                    b.ToTable("Serials", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Subscribe", b =>
                {
                    b.Property<string>("SubscribeId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("Description")
                        .HasColumnType("text")
                        .HasColumnName("description");

                    b.Property<int>("Duration")
                        .HasColumnType("integer")
                        .HasColumnName("duration");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("orderDate");

                    b.Property<decimal>("Price")
                        .HasColumnType("numeric")
                        .HasColumnName("price");

                    b.HasKey("SubscribeId");

                    b.ToTable("Subscribes", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribeCountry", b =>
                {
                    b.Property<string>("SubscribeId")
                        .HasColumnType("text");

                    b.Property<string>("CountryId")
                        .HasColumnType("text");

                    b.HasKey("SubscribeId", "CountryId");

                    b.HasIndex("CountryId");

                    b.ToTable("SubscribeCountries", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribeGenre", b =>
                {
                    b.Property<string>("SubscribeId")
                        .HasColumnType("text");

                    b.Property<string>("GenreId")
                        .HasColumnType("text");

                    b.HasKey("SubscribeId", "GenreId");

                    b.HasIndex("GenreId");

                    b.ToTable("SubscribeGenres", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribePerson", b =>
                {
                    b.Property<string>("SubscribeId")
                        .HasColumnType("text");

                    b.Property<string>("PersonId")
                        .HasColumnType("text");

                    b.HasKey("SubscribeId", "PersonId");

                    b.HasIndex("PersonId");

                    b.ToTable("SubscribePersons", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.User", b =>
                {
                    b.Property<string>("UserId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<string>("Email")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("email");

                    b.Property<bool>("IsAdmin")
                        .HasColumnType("boolean")
                        .HasColumnName("isAdmin");

                    b.Property<string>("Login")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("login");

                    b.Property<byte[]>("PasswordHash")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("passwordHash");

                    b.Property<byte[]>("PasswordSalt")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("passwordSalt");

                    b.Property<string>("Phone")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("phone");

                    b.Property<string>("RefreshToken")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("refreshToken");

                    b.Property<DateTime>("TokenCreated")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("tokenCreated");

                    b.Property<DateTime>("TokenExpires")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("tokenUpdated");

                    b.HasKey("UserId");

                    b.HasIndex("Email")
                        .IsUnique();

                    b.HasIndex("Login")
                        .IsUnique();

                    b.HasIndex("Phone")
                        .IsUnique();

                    b.ToTable("Users", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Video", b =>
                {
                    b.Property<string>("VideoId")
                        .HasColumnType("text")
                        .HasColumnName("id");

                    b.Property<int>("Duration")
                        .HasColumnType("integer")
                        .HasColumnName("duration");

                    b.Property<int?>("EpisodeNumber")
                        .HasColumnType("integer")
                        .HasColumnName("episodeNumber");

                    b.Property<bool>("IsSendTelegram")
                        .HasColumnType("boolean")
                        .HasColumnName("isSendTelegram");

                    b.Property<string>("MovieId")
                        .HasColumnType("text")
                        .HasColumnName("movieId");

                    b.Property<string>("SeasonId")
                        .HasColumnType("text")
                        .HasColumnName("seasonId");

                    b.Property<int>("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");

                    b.Property<byte[]>("VideoUrl")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("videoUrl");

                    b.Property<byte[]>("VideoUrlIv")
                        .IsRequired()
                        .HasColumnType("bytea")
                        .HasColumnName("videoUrlIv");

                    b.Property<int>("Year")
                        .HasColumnType("integer")
                        .HasColumnName("year");

                    b.HasKey("VideoId");

                    b.HasIndex("MovieId")
                        .IsUnique();

                    b.HasIndex("SeasonId");

                    b.ToTable("Videos", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.VideoCounty", b =>
                {
                    b.Property<string>("CountryId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.HasKey("CountryId", "VideoId");

                    b.HasIndex("VideoId");

                    b.ToTable("VideoCountries", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.VideoGenre", b =>
                {
                    b.Property<string>("GenreId")
                        .HasColumnType("text");

                    b.Property<string>("VideoId")
                        .HasColumnType("text");

                    b.HasKey("GenreId", "VideoId");

                    b.HasIndex("VideoId");

                    b.ToTable("VideoGenres", (string)null);
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Comment", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.User", "User")
                        .WithMany("Comments")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Comments")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Country", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.CountriesGroup", "CountriesGroup")
                        .WithMany("Countries")
                        .HasForeignKey("CountriesGroupId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("CountriesGroup");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Crew", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Person", "Person")
                        .WithMany("Crews")
                        .HasForeignKey("PersonId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Role", "Role")
                        .WithMany("Crew")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Crew")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Person");

                    b.Navigation("Role");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Favorite", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.User", "User")
                        .WithMany("Favorites")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Favorites")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Order", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Movie")
                        .WithMany("Orders")
                        .HasForeignKey("MovieId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("StreamAppApi.Contracts.Models.Serial", "Serial")
                        .WithMany("Orders")
                        .HasForeignKey("SerialId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("StreamAppApi.Contracts.Models.Subscribe", "Subscribe")
                        .WithMany("Orders")
                        .HasForeignKey("SubscribeId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("StreamAppApi.Contracts.Models.User", "User")
                        .WithMany("Orders")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Movie");

                    b.Navigation("Serial");

                    b.Navigation("Subscribe");

                    b.Navigation("User");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Rating", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.User", "User")
                        .WithMany("Ratings")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Ratings")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Season", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Serial", "Serial")
                        .WithMany("Seasons")
                        .HasForeignKey("SerialId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Serial");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribeCountry", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Country", "Country")
                        .WithMany("Subscribes")
                        .HasForeignKey("CountryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Subscribe", "Subscribe")
                        .WithMany("Countries")
                        .HasForeignKey("SubscribeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Country");

                    b.Navigation("Subscribe");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribeGenre", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Genre", "Genre")
                        .WithMany("Subscribes")
                        .HasForeignKey("GenreId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Subscribe", "Subscribe")
                        .WithMany("Genres")
                        .HasForeignKey("SubscribeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Genre");

                    b.Navigation("Subscribe");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.SubscribePerson", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Person", "Person")
                        .WithMany("Subscribes")
                        .HasForeignKey("PersonId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Subscribe", "Subscribe")
                        .WithMany("Persons")
                        .HasForeignKey("SubscribeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Person");

                    b.Navigation("Subscribe");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Video", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Movie", "Movie")
                        .WithOne("Video")
                        .HasForeignKey("StreamAppApi.Contracts.Models.Video", "MovieId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.HasOne("StreamAppApi.Contracts.Models.Season", "Season")
                        .WithMany("Videos")
                        .HasForeignKey("SeasonId")
                        .OnDelete(DeleteBehavior.Cascade);

                    b.Navigation("Movie");

                    b.Navigation("Season");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.VideoCounty", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Country", "Country")
                        .WithMany("Videos")
                        .HasForeignKey("CountryId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Countries")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Country");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.VideoGenre", b =>
                {
                    b.HasOne("StreamAppApi.Contracts.Models.Genre", "Genre")
                        .WithMany("Videos")
                        .HasForeignKey("GenreId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("StreamAppApi.Contracts.Models.Video", "Video")
                        .WithMany("Genres")
                        .HasForeignKey("VideoId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Genre");

                    b.Navigation("Video");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.CountriesGroup", b =>
                {
                    b.Navigation("Countries");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Country", b =>
                {
                    b.Navigation("Subscribes");

                    b.Navigation("Videos");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Genre", b =>
                {
                    b.Navigation("Subscribes");

                    b.Navigation("Videos");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Movie", b =>
                {
                    b.Navigation("Video")
                        .IsRequired();
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Person", b =>
                {
                    b.Navigation("Crews");

                    b.Navigation("Subscribes");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Role", b =>
                {
                    b.Navigation("Crew");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Season", b =>
                {
                    b.Navigation("Videos");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Serial", b =>
                {
                    b.Navigation("Orders");

                    b.Navigation("Seasons");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Subscribe", b =>
                {
                    b.Navigation("Countries");

                    b.Navigation("Genres");

                    b.Navigation("Orders");

                    b.Navigation("Persons");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.User", b =>
                {
                    b.Navigation("Comments");

                    b.Navigation("Favorites");

                    b.Navigation("Orders");

                    b.Navigation("Ratings");
                });

            modelBuilder.Entity("StreamAppApi.Contracts.Models.Video", b =>
                {
                    b.Navigation("Comments");

                    b.Navigation("Countries");

                    b.Navigation("Crew");

                    b.Navigation("Favorites");

                    b.Navigation("Genres");

                    b.Navigation("Orders");

                    b.Navigation("Ratings");
                });
#pragma warning restore 612, 618
        }
    }
}
